package com.meow.controller;

import java.util.Arrays;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.meow.enums.ArmorEnum;
import com.meow.mapper.ArmorMapper;
import com.meow.mapper.UserMapper;
import com.meow.pojo.Armor;
import com.meow.pojo.User;

import de.felixroske.jfxsupport.FXMLController;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;

@FXMLController
public class MainController{
	@Autowired
	private UserMapper userMapper;
	@Autowired
	private ArmorMapper armorMapper;
	
	
	@FXML
	public void testAction(ActionEvent event) {
		QueryWrapper<Armor> queryWrapper = new QueryWrapper<Armor>();
		List<String> equipmentList = Arrays.asList(
				ArmorEnum.BELT.getCode(), 
				ArmorEnum.BOOT.getCode(),
				ArmorEnum.GLOV.getCode(),
				ArmorEnum.HELM.getCode(),
				ArmorEnum.SHIE.getCode(),
				ArmorEnum.TORS.getCode());
		queryWrapper.in("type", equipmentList);
		List<Armor> selectList = armorMapper.selectList(queryWrapper);
		System.out.println(selectList);
	}
}
